package cac.fenjian.resource.DeliveryPlanQuery.rest;

import cac.fenjian.resource.DeliveryPlanQuery.service.SortDeliveryService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
@RequestMapping("sortDeliveryRest")
public class SortDeliveryRest {
    @Autowired
    private SortDeliveryService sortDeliveryService;

    @PostMapping("querySortInfo")
    public PageInfo querySortInfo(@RequestBody HashMap map){
        HashMap page = (HashMap) map.get("page");
        HashMap queryMap = (HashMap) map.get("queryMap");
        return sortDeliveryService.querySortMatchByParam(page,queryMap);
    }
    @PostMapping("querySendTool")
    public PageInfo querySendTool(@RequestBody HashMap map){
        HashMap page = (HashMap) map.get("page");
        HashMap queryMap = (HashMap) map.get("queryMap");
        return sortDeliveryService.querySendTool(page,queryMap);
    }
}
